<?php
/*
 * 检查权限
 * 赵坤
 * 20161229
 * */
function checkAuth($rule,$type='or'){
    if(session('is_admin')){
        return true;
    }else{
        if(is_array($rule)&&!empty($rule)){
            $rule = implode(',',$rule);
        }
        $auth = \think\Auth::instance();
        return $auth->check($rule,session('seller_id'),$type);
    }

}
/*
 * 返回语言
 * 赵坤
 * 20161229
 * */
function getLanguage($name){
    if(!empty($name)){
        $language = config('language');
        return $language[$name];
    }else{
        return ;
    }
}
/*
 *
 *
 * */


